import request, { download } from '@/utils/request'

export default {
  /**
   * 查询操作日志列表
   * @param query
   * @returns
   */
  page: (query: any) => {
    return request.get('/admin/system/log/oper/page', { params: query })
  },

  /**
   * 删除操作日志
   * @param operId
   * @returns
   */
  delete: (operId: any) => {
    return request.delete(`/admin/system/log/oper/${operId}`)
  },

  /**
   * 清空操作日志
   * @returns
   */
  clean: () => {
    return request.delete('/admin/system/log/oper/clean')
  },

  /**
   * 导出操作日志
   * @param query
   * @param fileName
   * @returns
   */
  download: (query: any, fileName: string) => {
    download('/admin/system/log/oper/export', query, fileName,{})
  }
}